import request, {upload} from '@/utils/request'

// 查询处置列表
export function listDeal(query) {
  return request({
    url: '/wms/deal/list',
    method: 'get',
    params: query
  })
}

// 初始化
export function initBean() {
    return request({
        url: '/wms/deal/initBean',
        method: 'post'
    })
}

// 查询处置详细
export function getDeal(id) {
  return request({
    url: '/wms/deal/' + id,
    method: 'get'
  })
}

// 新增处置
export function addDeal(data) {
  return request({
    url: '/wms/deal',
    method: 'post',
    data: data
  })
}

// 修改处置
export function updateDeal(data) {
  return request({
    url: '/wms/deal',
    method: 'put',
    data: data
  })
}

// 删除处置
export function delDeal(id) {
  return request({
    url: '/wms/deal/' + id,
    method: 'delete'
  })
}

export function uploadRegister(formData) {
  return upload(`/sacw/disposal/register/upload`,formData)
}
